<html>
<head><meta charset="utf-8"><title>Returning actual allocation size · t-libs/wg-allocators · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/index.html">t-libs/wg-allocators</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/Returning.20actual.20allocation.20size.html">Returning actual allocation size</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="197215425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/Returning%20actual%20allocation%20size/near/197215425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nick12 <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/Returning.20actual.20allocation.20size.html#197215425">(May 11 2020 at 22:54)</a>:</h4>
<p>I was skimming AlocRef in nightly and saw that alloc returns the usable size: <a href="https://doc.rust-lang.org/std/alloc/trait.AllocRef.html#tymethod.alloc">https://doc.rust-lang.org/std/alloc/trait.AllocRef.html#tymethod.alloc</a><br>
That reminded me of the following mimalloc issue: <a href="https://github.com/microsoft/mimalloc/issues/2">https://github.com/microsoft/mimalloc/issues/2</a><br>
Specifically the link from gnzlbg to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0901r0.html">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0901r0.html</a><br>
As far as I can tell, that alloc method would have the same issues as the nallocx described there</p>



<a name="214509694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/Returning%20actual%20allocation%20size/near/214509694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/Returning.20actual.20allocation.20size.html#214509694">(Oct 25 2020 at 20:14)</a>:</h4>
<p>I filed <a href="https://github.com/rust-lang/wg-allocators/issues/74">https://github.com/rust-lang/wg-allocators/issues/74</a> and <a href="https://github.com/rust-lang/wg-allocators/issues/75">https://github.com/rust-lang/wg-allocators/issues/75</a> a few days ago that point to other reasons the current design here is suboptimal. Unfortunately, they've gotten no response. I guess most of the work on this was completed a while ago, and the wg isn't really active now (even this is a fairly old post)...</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>